package com.qianchang.microfinance.view.hsmywallet;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.GridView;

import com.dm.library.utils.ToastUtil;
import com.qianchang.microfinance.R;
import com.qianchang.microfinance.bean.BankCardBean;
import com.qianchang.microfinance.bean.FindUserBasicInfoBean;
import com.qianchang.microfinance.bean.MineUserInfo;
import com.qianchang.microfinance.view.base.BaseFragment;

/**
 * 鸿胜科技新增我的钱包金币充值
 *
 */

public class HSRecharGoldFragment extends BaseFragment implements View.OnClickListener{

    private Button butRecharge;
    private GridView blanceGrid;
    private HSBuyGoldAdapter adapter;


    @Override
    protected View onRootViewCreate(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = LayoutInflater.from(mContext).inflate(R.layout.fragment_rechargold, container, false);
        butRecharge = (Button) view.findViewById(R.id.btn_recharge);
        butRecharge.setOnClickListener(this);

        blanceGrid = (GridView) view.findViewById(R.id.gv_blance_id);
        adapter = new HSBuyGoldAdapter(getContext());
        blanceGrid.setAdapter(adapter);
        blanceGrid.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
                adapter.setIndex(position);
            }
        });

        return view;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Bundle bundle = getArguments();


    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
    }

    @Override
    public void onResume() {
        super.onResume();


    }



    @Override
    public void onDetach() {
        super.onDetach();
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.btn_recharge:
                ToastUtil.getInstant().show(getContext(),"正在开发敬请期待!");
                break;
            default:
                break;
        }
    }



}
